package com.crayon.account.dummy;

import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;


/**
 * Helper class for providing sample content for user interfaces created by
 * Android template wizards.
 * <p>
 * TODO: Replace all uses of this class before publishing your app.
 */
public class DummyContent {

	/**
	 * An array of sample (dummy) items.
	 */
	public static List<DummyItem> ITEMS = new ArrayList<DummyItem>();

	/**
	 * A map of sample (dummy) items, by ID.
	 */
	public static Map<String, DummyItem> ITEM_MAP = new HashMap<String, DummyItem>();

//	static {
//		// Add 3 sample items.
//		addItem(new DummyItem("1", R.string.main_list_menutext_viewmonthly,FRGListMonth.class));
//		addItem(new DummyItem("2", R.string.main_list_menutext_insert,FragmentWriteList.class));
//		addItem(new DummyItem("3", R.string.main_list_menutext_summary,FRGMonthChart.class));
//	}
//
	public static void addItem(List<DummyItem> items) {
		ITEMS.clear();ITEM_MAP.clear();
		for(DummyItem item : items){
			ITEMS.add(item);
			ITEM_MAP.put(item.id, item);
		}
	}

	/**
	 * A dummy item representing a piece of content.
	 */
	public static class DummyItem {
		public String id;
		public String content;
		public Class detailFragment;

		public DummyItem(String id, String content,Class detailFragment) {
			this.id = id;
			this.content = content;
			this.detailFragment = detailFragment;
		}

		@Override
		public String toString() {
			return content;
		}
	}
}
